﻿/*======================================*\
* Author: Vincent
* LastModifyUser: Vincent
* Description:  
* CreateTime： 2012-05
* Remark:  
\*======================================*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using AppCode.DataHandler;

namespace AppCode.Domain.Services
{
    /// <summary>
    /// 数据初始配置信息处理
    /// </summary>
    public class DbConfigHandler
    {
        protected DataHanderExcute db = null;
        public DbConfigHandler(string conStr)
        {
            db = new DataHanderExcute(conStr);
        }

        /// <summary>
        /// 取得所有用户
        /// </summary>
        private string sql = "SELECT   NAME   FROM   master..sysdatabases   ORDER   BY   NAME";

        public List<string> GetDataBaseName()
        {
            List<string> list = new List<string>();
            IDataReader dr = db.ExecuteReader(db.GetSqlStringCommond(sql));
            while (dr.Read())
            {
                list.Add(dr[0].ToString());
            }
            dr.Close();
            return list;
        }
    }
}
